<!--<?php print <<<EOT
-->
<style type="text/css">
.threadlist{padding-left:10px;bottom:-1px;position:absolute;}
.threadlist a{display:block;float:left;padding:0 9px;border-bottom:0;line-height:25px;height:25px;}
.threadlist .bta{height:20px;line-height:20px;border:1px solid $tablecolor;margin-left:1em;}
.threadlist .current,.threadlist .active{background:$cbgcolor;border:1px solid $headborder;padding:0 8px;border-bottom:0;color:$cbgfont;}
</style>
<div id="breadCrumb" class="cc">
		<span class="fr">
<!--
EOT;
if($admin_T[admin]){
if($db_adminshow){print <<<EOT
-->
			版主: <select name="admin" onchange="Ajump(this.options[this.selectedIndex].value);"><option value="">版主列表</option>$admin_T[admin]</select>
<!--
EOT;
}else{print <<<EOT
-->
					版主: $admin_T[admin]
<!--
EOT;
}}if($admincheck || $groupid==3 || $groupid==4){print <<<EOT
-->
					<a href="forumcp.php?action=edit&fid=$fid" class="s3">[版块管理]</a>
<!--
EOT;
}print <<<EOT
-->
		</span>
$msg_guide
<a href="rss.php?fid=$fid" target="_blank" title="RSS订阅本版面最新帖子">
<img src="$imgpath/$stylepath/rss.png" align="absbottom" style="margin-bottom:2px;" /></a>
<span id="shortcut">
<!--
EOT;
if(strpos($winddb[shortcut],','.$fid.',') !==false){
print <<<EOT
-->
<a style="cursor:pointer;" onclick="javascript:shortCut();" title="将本版块移除出我的书签"><img src="$imgpath/$stylepath/thread/collect.gif" align="absbottom" style="margin-bottom:2px;" /></a>
<!--
EOT;
}else{
print <<<EOT
-->
<a style="cursor:pointer;" onclick="javascript:shortCut();" title="将本版块添加到我的书签"><img src="$imgpath/$stylepath/thread/cancel.gif" align="absbottom" style="margin-bottom:2px;" /></a>
<!--
EOT;
}
print <<<EOT
-->
			</span>
</div>
<!--ads begin-->
<!--
EOT;
if($advertdb[text]){print <<<EOT
-->
<div class="ad-text" style="margin-bottom:8px;">
<table width="100%" cellspacing="0" cellpadding="0">
<!--
EOT;
$id=0;
$idp = 100/$db_txtadnum;
foreach($advertdb[text] as $value){
if($id==0){print <<<EOT
-->
	<tr class="tr3">
<!--
EOT;
}$id++;print <<<EOT
-->
	  <td class="f_one black tac" width="$idp%">$value[code]</td>
<!--
EOT;
if($id==$db_txtadnum){
$id=0;print <<<EOT
-->
	</tr>
<!--
EOT;
}}if($id && $id<$db_txtadnum){
for($i=$id;$i<$db_txtadnum;$i++){print <<<EOT
-->
	  <td class="f_one" width="$idp%"><br /></td>
<!--
EOT;
}print <<<EOT
-->
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table></div>
<!--
EOT;
}print <<<EOT
-->
<!--ads end-->
<div class="c"></div>
<!--
EOT;
if($foruminfo['aid'] || is_array($foruminfo['commend'])){print <<<EOT
-->
<div class="t">
	<table width="100%" cellspacing="0" cellpadding="0">
		<tr>
			<td class="h">
			<div class="pr cc" style="height:30px;">
			    <a class="fr closeicon" href="javascript:;" onClick="return IndexDeploy('thread',0);"><img id="img_thread" src="$imgpath/$stylepath/index/cate_$thread_img.gif" /></a>
				<div class="fn fl threadlist" style="padding-left:10px;">
<!--
EOT;
if($foruminfo[aid]){
$tmpStyle = is_array($foruminfo['commend']) ? 'class="normal"' : 'class="active"';
print <<<EOT
-->
	<a $tmpStyle onmouseover="return swap_tab(1)" id="tab_t1" href="javascript:;">版块公告</a>
<!--
EOT;
}if(is_array($foruminfo['commend'])){print <<<EOT
-->
	<a class="active" onmouseover="return swap_tab(2)" id="tab_t2" href="javascript:;">版主推荐</a>
<!--
EOT;
}print <<<EOT
-->
				</div>
			</div>
			</td>
		</tr>
<!--
EOT;
if($foruminfo['descrip']){print <<<EOT
-->
		<tr class="tr2">
			<td>
版块简介：$foruminfo[descrip]
			</td>
		</tr>
<!--
EOT;
}print <<<EOT
-->
		<tbody id="cate_thread" style="$cate_thread">
		<tr style="line-height:1.2;">
			<td>
<!--
EOT;
if($foruminfo[aid]){
$tmpStyle = is_array($foruminfo['commend']) ? 'style="display:none"' : '';
print <<<EOT
-->
<div id="tab_1" class="p10" $tmpStyle>
	$foruminfo[content]
	<div class="c"></div>
	<div class="fr"><a class="gray" href="notice.php?fid=$foruminfo[fid]#$foruminfo[aid]">更多</a></div>
	<div class="c"></div>

</div>
<!--
EOT;
}if(is_array($foruminfo['commend'])){
print <<<EOT
-->	
<div class="p10" id="tab_2">
<style type="text/css">
/*版主推荐*/
#commend li{width:45%;float:left;padding-left:1.2em;background:url($imgpath/$stylepath/dotB.png) no-repeat 0 .3em;height:20px;line-height:20px;}
#commend a{margin-right:1em;}
</style>
<ul id="commend" class="cc">
<!--
EOT;
foreach($foruminfo['commend'] as $key=>$value){print <<<EOT
-->
<li><a href="read.php?tid=$value[tid]" class="blue">$value[subject]</a>$value[author]</li>
<!--
EOT;
}print <<<EOT
-->
</ul></div>
<!--
EOT;
}print <<<EOT
-->
			</td>
		</tr>
		</tbody>
	</table>
</div>
<script language="JavaScript">
function swap_tab(n){
try{
	for(var i=1;i<=2;i++){
		var curC=document.getElementById("tab_"+i);
		var curB=document.getElementById("tab_t"+i);
		if(n==i){
			curC.style.display="block";
			curB.className="active"
		}else{
			curC.style.display="none";
			curB.className="normal"
		}
	}}catch(e){}
}
</script>
<!--
EOT;
}$thread_children && require_once PrintEot($thread_children);
if($db_union[5]){
$db_union[5]=str_replace(array('{f_fid}','{sch_time}'),array($fid,$_G[schtime]),$db_union[5]);
}print <<<EOT
-->

<div class="c" id="c"></div>
<div class="t3">
<!--
EOT;
if($N_allowtypeopen){print <<<EOT
-->
<span class="fr"><a href="post.php?fid=$fid"><img src="$imgpath/$stylepath/post.png" id="td_post" /></a></span>
<!--
EOT;
}print <<<EOT
-->
<span class="fl">$pages$db_union[5]</span>
<div class="c"></div>
</div>
<div class="c"></div>
<!--
EOT;
if($N_allowtypeopen){print <<<EOT
-->
<div id="menu_post" class="menu menu-post cc f14 tac" style="display:none;">
	<div class="menu-b" style="width:75px;">
<!--
EOT;
if($foruminfo['allowtype'] & 1){print <<<EOT
-->
	<a href="post.php?fid=$fid">新 帖</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 2 && $_G[allownewvote]){print <<<EOT
-->
	<a href="post.php?fid=$fid&special=1">投 票</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 4 && $_G[allowactive]){print <<<EOT
-->
	<a href="post.php?fid=$fid&special=2">活 动</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 8 && $_G['allowreward']){print<<<EOT
-->
	<a href="post.php?fid=$fid&special=3">悬 赏</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 16 && $_G['allowgoods']){print <<<EOT
-->
	<a href="post.php?fid=$fid&special=4">商 品</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 32 && $_G['allowdebate']){print <<<EOT
-->
	<a href="post.php?fid=$fid&special=5">辩 论</a>
<!--
EOT;
}print <<<EOT
-->
	</div>
</div>
<!--
EOT;
}print <<<EOT
-->
$trd_adminhide
<div class="t z" style="margin:auto">
<table cellspacing="0" cellpadding="0" width="100%" id="ajaxtable">
<!--
EOT;
$lang_special=array(
	'all'=> '按类型查看',
	'1'	=> '投 票',
	'2'	=> '活 动',
	'3'	=> '悬 赏',
	'4'	=> '商 品',
	'5'	=> '辩 论',
);print <<<EOT
-->
	<tr><th class="h" colspan="6">
	<div class="pr cc" style="height:30px;">
	<div id="menu_special" class="menu-post tac" style="display:none;">
		<div class="menu-b f14">
			 <ul style="width:77px;*padding-left:5px;line-height:2">
				  <li><a href="thread.php?fid=$fid">全 部</a></li>
				  <li><a href="thread.php?fid=$fid&special=1">投 票</a></li>
				  <li><a href="thread.php?fid=$fid&special=2">活 动</a></li>
				  <li><a href="thread.php?fid=$fid&special=3">悬 赏</a></li>
				  <li><a href="thread.php?fid=$fid&special=4">商 品</a></li>
				  <li><a href="thread.php?fid=$fid&special=5">辩 论</a></li>
			 </ul>
		</div>
	</div>
	<div class="fn fl threadlist">
		<a id="thread_type_all" href="thread.php?fid=$fid#c">全部</a>
		<span id="t_typedb">
		<a id="thread_type_digest" href="thread.php?fid=$fid&search=digest#c">精华</a>
<!--
EOT;
$i = 1;
if($groupid!='guest' && $foruminfo['f_check']){$i++;print <<<EOT
-->
		<a id="thread_type_check" href="thread.php?fid=$fid&search=check#c">未验证主题</a>
<!--
EOT;
}
foreach($t_typedb as $key=>$value){
if($value){$i++;
print <<<EOT
-->
		<a id="thread_type_$key" href="thread.php?fid=$fid&type=$key#c">{$value}</a>
<!--
EOT;
}}print <<<EOT
-->
		</span>
		<a href="javascript:void(0);" class="bta fn" id="td_special">$lang_special[$pwSelectSpecial]<span style="font-size:9px">▼</span></a>
	</div>
<!--
EOT;
if($i > $db_maxtypenum){print<<<EOT
-->
<style type="text/css">
.threadlist{padding-left:45px;}
.maxtleft{position:absolute;background:url($imgpath/$stylepath/btLeft.gif);width:9px;height:18px;left:0px;top:9px;text-indent:-2000em;overflow: hidden;}
.maxtright{position:absolute;background:url($imgpath/$stylepath/btRight.gif);width:9px;height:18px;left:25px;top:9px;text-indent:-2000em;overflow: hidden;}

</style>
<span class="maxtleft" onclick="showTypeTab(-$db_maxtypenum,$db_maxtypenum,'a');" style="cursor:pointer;margin:0 5px" title="上一页分类">上一页分类</span>
<span class="maxtright" onclick="showTypeTab($db_maxtypenum,$db_maxtypenum,'a');" style="cursor:pointer" title="下一页分类">下一页分类</span>
<!--
EOT;
}print<<<EOT
-->
</div>
<script language="javascript">
<!--
EOT;
if($i > $db_maxtypenum){print<<<EOT
-->
function setCurrentType(id,n,tag){
	var o = getObj('t_typedb');
	var f = o.getElementsByTagName(tag);
	var s = 0;
	var page = 0;
	for(i=0; i<f.length; i++){
		if(f[i].id == id){
			s = i;break;
		}
	}
	page = Math.floor(s/n);
	for(i=0; i<f.length; i++){
		if(i>=page*n && i<(page+1)*n){
			f[i].style.display = 'inline';
		}else{
			f[i].style.display = 'none';
		}
	}
}
function showTypeTab(p,n,tag){
	var o = getObj('t_typedb');
	var f = o.getElementsByTagName(tag);
	var s = 0;
	for(i=0;i<f.length;i++)
		if(f[i].style.display != "none"){s = i;break;}
	s += p;
	if(s<0 || s>f.length)return;
	for(i=0;i<f.length;i++){
		if(i>=s && i<s+n){
			f[i].style.display = "inline";
		} else{
			f[i].style.display = "none";
		}
	}
	return;
}
setCurrentType('thread_type_$pwSelectType',$db_maxtypenum,'a');
<!--
EOT;
}print<<<EOT
-->
setCurrent('thread_type_$pwSelectType','thread_type_all','current');
</script>
		</th>
	</tr>
	<tbody style="table-layout:fixed;">
	<tr class="tr2">
	<td style="width:2.8em" class="tac y-style"></td>
	<td class="tac">文章</td>
	<td style="width:10em" class="y-style">作者</td>
	<td style="width:9em" class="tal y-style">回复 / 人气</td>
	<td style="width:12em" class="y-style">最后发表</td>
	</tr>
<!--
EOT;
if($page==1 && $ifsort){
if($NT_A){
$NT_A[startdate] = get_date($NT_A[startdate]);
print <<<EOT
-->
	<tr align="middle" class="tr3 t_one">
		<td class="tac"><img src="$imgpath/$stylepath/thread/anc.gif" /></td>
		<th>&nbsp论坛公告: <h3><a href="$NT_A[url]" class="black">$NT_A[subject]</a></h3></th>
		<td class="tal y-style"><a href="u.php?action=show&username=$NT_A[rawauthor]" class="bl">$NT_A[author]</a></td>
		<td class="tal y-style"><a href="notice.php?fid=$NT_A[fid]">论坛公告</a></td>
		<td class="y-style">$NT_A[startdate]</td>
	</tr>
<!--
EOT;
}if($NT_C){
$NT_C[startdate] = get_date($NT_C[startdate]);
print <<<EOT
-->
	<tr align="middle" class="tr3 t_one">
		<td class="tac"><img src="$imgpath/$stylepath/thread/anc.gif" /></td>
		<th>&nbsp分类公告: <h3><a href="$NT_C[url]" class="black">$NT_C[subject]</a></h3></th>
		<td class="tal y-style"><a href="u.php?action=show&username=$NT_C[rawauthor]" class="bl">$NT_C[author]</a></td>
		<td class="tal y-style"><a href="notice.php?fid=$NT_C[fid]">分类公告</a></td>
		<td class="y-style">$NT_C[startdate]</td>
	</tr>
<!--
EOT;
}}
$tpc_topped=0;
foreach($threaddb as $key => $thread){
$forumset['cutnums'] && $thread['subject'] = substrs($thread['subject'],$forumset['cutnums']);
$thread['postdate'] = get_date($thread['postdate'],'Y-m-d');
$thread['lstptime'] = get_date($thread['lastpost']);
if($page==1 && $ifsort && $thread[topped]==0 && $tpc_topped==0){
$tpc_topped=1;
print <<<EOT
-->
	<tr class="tr2"><td colspan="6" class="tac" style="border-top:0">普通主题</td></tr>
<!--
EOT;
}print <<<EOT
-->
	<tr align="center" class="tr3 t_one"><td><a title="打开新窗口" href="$thread[tpcurl]" target="_blank">$thread[status]</a></td>
	<td style="text-align:left;line-height:23px;" id="td_$thread[tid]">
<!--
EOT;
if($thread[digest]){print <<<EOT
-->
			<img class="fr" src="$imgpath/$stylepath/file/digest_$thread[digest].gif" align="absmiddle" style="margin-top:4px;" title="精华帖标志" />
<!--
EOT;
}if($thread[adminbox]){print <<<EOT
-->
<span style="margin-right:5px;">$thread[adminbox]</span>
<!--
EOT;
}if($thread[toolinfo]){print <<<EOT
-->
    		<span class="s3">[$thread[toolinfo]]</span>
<!--
EOT;
}if($thread[topped]){print <<<EOT
-->
			<img src="$imgpath/$stylepath/file/headtopic_$thread[topped].gif" align="absmiddle" title="置顶帖标志"/>
<!--
EOT;
}print <<<EOT
-->
	$thread[useriocn]

<!--
EOT;
if($forumset['addtpctype'] && $t_typedb[$thread['type']] && $thread['fid']==$fid){print <<<EOT
-->
			<a href="thread.php?fid=$fid&type=$thread[type]" class="s8">[{$t_typedb[$thread[type]]}]</a>
<!--
EOT;
}print <<<EOT
-->
			<h3>
<!--
EOT;
if($thread['state'] == 0 && $thread['rewcredit'] > 0){print <<<EOT
-->
			<span class="s1"> &#8212; 悬赏金额：$thread[rewcredit] &#8212; </span>
<!--
EOT;
}print <<<EOT
-->
			<a href="$thread[tpcurl]" id="a_ajax_$thread[tid]">$thread[subject]</a></h3>&nbsp; $thread[ifmark] $thread[titleadd]
<!--
EOT;
if($timestamp-$thread[lastpost]<=$db_newtime){print <<<EOT
-->
	<img src="$imgpath/$stylepath/file/new.gif" align="absmiddle" title="新帖标志" />
<!--
EOT;
}if($forumset['inspect'] && $thread['inspect']){print <<<EOT
-->
	<span class="w"><font color="red">[{$thread[inspect][1]} 阅至 {$thread[inspect][0]}楼]</font></span>
<!--
EOT;
}if($thread[ispage]){print <<<EOT
-->
	<span class="w">$thread[ispage]</span>
<!--
EOT;
}print <<<EOT
-->
	</td>
	<td class="tal y-style"><a href="u.php?action=show&uid=$thread[authorid]" class="bl">$thread[author]</a>
		<div class="f10 gray2">$thread[postdate]</div></td>
	<td class="tal y-style f10"><span class="s8">$thread[replies]</span> / $thread[hits]</td>
	<td class="tal y-style"><a href="read.php?tid=$thread[tid]&page=e&fpage=$page#a" class="f10"> $thread[lstptime] </a><br />
	<span class="gray2">by: $thread[lastposter]</span></td>
	</tr>
<!--
EOT;
if($managemode==1){
if($db_ajax & 1){print <<<EOT
-->
    <tr class="tr3"><td></td><td>
	<div class="fr s8"> [
<!--
EOT;
if($isGM || $pwSystem[typeadmin]){print <<<EOT
-->
		<a id="digest_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=digest&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="加入精华帖">精</a> <a id="lock_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=lock&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="锁定帖子不让会员再回复帖子">锁定</a> <a id="pushtopic_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=pushtopic&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="提前帖子">提</a> <a id="downtopic_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=downtopic&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="将帖子往后压">压帖</a> <a id="edit_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=edit&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="编辑标题">亮</a>
<!--
EOT;
}if($isGM || $pwSystem[topped]){print <<<EOT
-->
<a id="headtopic_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=headtopic&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="置顶主题:将主题置顶,以便会员查看">顶</a>
<!--
EOT;
}print <<<EOT
-->
] </div><td colspan="4"></td></td></tr>
<!--
EOT;
}else{print <<<EOT
-->
    <tr class="tr3"><td></td><td>
	<div class="fr s8"> [
<!--
EOT;
if($isGM || $pwSystem[typeadmin]){print <<<EOT
-->
		<a id="digest_$thread[tid]" href="mawhole.php?action=digest&fid=$thread[fid]&seltid=$thread[tid]" title="加入精华帖">精</a> <a id="lock_$thread[tid]" href="mawhole.php?action=lock&fid=$thread[fid]&seltid=$thread[tid]" title="锁定帖子不让会员再回复帖子">锁定</a> <a id="pushtopic_$thread[tid]" href="mawhole.php?action=pushtopic&fid=$thread[fid]&seltid=$thread[tid]" title="提前帖子">提</a> <a id="downtopic_$thread[tid]" href="mawhole.php?action=downtopic&fid=$thread[fid]&seltid=$thread[tid]" title="将帖子往后压">压帖</a> <a id="edit_$thread[tid]" href="mawhole.php?action=edit&fid=$thread[fid]&seltid=$thread[tid]" title="编辑标题">亮</a>
<!--
EOT;
}if($isGM || $pwSystem[topped]){print <<<EOT
-->
	<a id="headtopic_$thread[tid]" href="mawhole.php?action=headtopic&fid=$thread[fid]&seltid=$thread[tid]" title="置顶主题:将主题置顶,以便会员查看">顶</a>
<!--
EOT;
}print <<<EOT
-->
		] </div><td colspan="4"></td></td></tr>
<!--
EOT;
}}print <<<EOT
-->

<!--
EOT;
}print <<<EOT
-->
	<tr><td colspan="6" class="f_one" style="height:8px"></td></tr>
	</tbody>
</table></div>
<!--
EOT;
if($managecheck){print <<<EOT
-->
<div class="t5 tac f_one" style="padding:15px 0 15px; margin-bottom:2px;margin-top:2px;">
	<div>管理选项:
<!--
EOT;
if($foruminfo['f_check'] && $search=='check' && ($isGM || $pwSystem['tpccheck'])){print <<<EOT
-->
		<input name="action" type="radio" value="check" />验证主题
<!--
EOT;
}if($isGM || $pwSystem[topped]){print <<<EOT
-->
		<input name="action" type="radio" value="headtopic" />置顶
<!--
EOT;
}if($isGM || $pwSystem[typeadmin]){print <<<EOT
-->
		<input name="action" type="radio" value="digest" />精华
		<input name="action" type="radio" value="lock" />锁定
		<input name="action" type="radio" value="edit" />加亮
		<input name="action" type="radio" value="pushtopic" />提前
		<input name="action" type="radio" value="downtopic" />压帖
<!--
EOT;
}if($isGM || $pwSystem[tpctype]){print <<<EOT
-->
		<input name="action" type="radio" value="type" />主题分类
<!--
EOT;
}if($isGM || $pwSystem[moveatc]){print <<<EOT
-->
		<input name="action" type="radio" value="move" />移动
<!--
EOT;
}if($isGM || $pwSystem[copyatc]){print <<<EOT
-->
		<input name="action" type="radio" value="copy" />复制
<!--
EOT;
}if($isGM || $pwSystem[unite]){print <<<EOT
-->
		<input name="action" type="radio" value="unite" />合并
<!--
EOT;
}if($isGM || $pwSystem[delatc]){print <<<EOT
-->
		<input name="action" type="radio" value="del" checked />删除
<!--
EOT;
}print <<<EOT
-->
	</div>
	<div style="margin-top:10px;">
	     <input class="bt" type="button" name="chkall" value="全 选" onclick="CheckAll(this.form)" />
		 <input class="bt" type="button" value="帖子管理" onclick="location.href='thread.php?fid=$fid&search=$search&page=$page&concle=$concle'" />
		 <input class="btn" type="button" name="hello" value="提 交" onclick="this.form.submit();" />
	</div>
</div>
</form>
<!--
EOT;
}print <<<EOT
-->
<div class="t3"><table cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td>
		<form action="thread.php?fid=$fid&page=$page" method="post">
		<input type="hidden" name="type" value="$type">
		<input type="hidden" name="special" value="$special">
		<select name="search">
			<option value="1">1天内的主题</option>
			<option value="digest">本版精华区</option>
			<option value="1">1天内的主题</option>
			<option value="2">2天内的主题</option>
			<option value="7">1星期内的主题</option>
			<option value="30">1个月内的主题</option>
			<option value="60">2个月内的主题</option>
			<option value="90">3个月内的主题</option>
			<option value="180">6个月内的主题</option>
			<option value="365">1年内的主题</option>
		</select>
<!--
EOT;
if($_G[alloworder]){print <<<EOT
-->
		<select name="orderway">
			<option value="lastpost" $ordersel[lastpost]>最后发表</option>
			<option value="postdate" $ordersel[postdate]>发表时间</option>
			<option value="hits" $ordersel[hits]>人气</option>
			<option value="replies" $ordersel[replies]>回复</option>
		</select>
		<select name="asc">
			<option value="ASC" $ascsel[ASC]>升序</option>
			<option value="DESC" $ascsel[DESC]>降序</option>
		</select>
<!--
EOT;
}print <<<EOT
-->
		<input class="btn" type="button" value="提 交" onclick="this.form.submit();">
		</form>
		</td>
		<td align="right" width="40%">
		<form name="jump" method="post">
<!--
EOT;
if($winduid){print <<<EOT
-->
		<a class="bta fr" onclick="sendmsg('pw_ajax.php?action=readlog','',this.id);" id="readlog" href="javascript:;">帖子浏览记录<span class="f9">▼</span></a>
		<a class="bta fr" id="threadlog" onclick="sendmsg('pw_ajax.php','action=threadlog',this.id);" href="javascript:;">版块浏览记录<span class="f9">▼</span></a>
<!--
EOT;
}print <<<EOT
-->
		<a class="bta fr" href="profile.php?action=forumright&fid=$fid" title="查看您在本版块的权限">版块权限查看</a>
		</form>
		</td>
	</tr>
</table></div>

<div class="t3">
<!--
EOT;
if($foruminfo['allowtype']){print <<<EOT
-->
<span class="fr"><a href="post.php?fid=$fid"><img src="$imgpath/$stylepath/post.png" id="td_post1" /></a></span>
<!--
EOT;
}print <<<EOT
-->
	<span class="fl">$pages</span>
	<div class="c"></div>
</div>
<div class="c"></div>
<!--
EOT;
$db_threadonline==1 && require_once PrintEot('thread_online');
$fastpost && require_once PrintEot($fastpost);
print <<<EOT
-->
<br />
<div style="width:550px;margin:auto;" class="pd8">
    <center>
         <img src="$imgpath/$stylepath/thread/topicnew.gif" align="absmiddle"/> 开放主题&nbsp;&nbsp;&nbsp;<img src="$imgpath/$stylepath/thread/topichot.gif" align="absmiddle"/> 热门主题&nbsp;&nbsp;&nbsp;<img src="$imgpath/$stylepath/thread/topiclock.gif" align="absmiddle"/> 锁定主题&nbsp;&nbsp;&nbsp;<img src="$imgpath/$stylepath/thread/topicclose.gif" align="absmiddle"/> 关闭主题&nbsp;&nbsp;&nbsp;<img src="$imgpath/$stylepath/thread/vote.gif" align="absmiddle"/> 投票主题&nbsp;&nbsp;&nbsp;<img src="$imgpath/$stylepath/thread/votelock.gif" align="absmiddle"/> 锁定投票
    </center>
</div>


<script language="JavaScript">
var ifcheck = true;
var fid = '$fid';
var forumtitle = "$foruminfo[name]";
var imgok = "collect.gif";
var imgno = "cancel.gif";
var myshortcut = "$myshortcut";
function CheckAll(form){
	for(var i=0;i<form.elements.length-12;i++){
		var e = form.elements[i];
		if(e.type=='checkbox') e.checked = ifcheck;
	}
	ifcheck = ifcheck == true ? false : true;
}
function Fjump(value){
	if(value!=''){
		window.location=('$B_url/thread.php?fid='+value);
	}
}
function Ajump(value){
	if(value!= ''){
		window.location=('$B_url/u.php?action=show&username='+value);
	}
}
var totalpage = parseInt('$totalpage');
var page = parseInt('$page');
if(totalpage > 1){
	document.onkeydown=function(e){
		var e = is_ie ? window.event : e;
		var tagname = is_ie ? e.srcElement.tagName : e.target.tagName;
		if(tagname == 'INPUT' || tagname == 'TEXTAREA'){
			return;
		}
		actualCode = e.keyCode ? e.keyCode : e.charCode;
		if(actualCode == 39 && page<totalpage) {
			window.location = 'thread.php?fid=$fid&search={$search}&{$w_add}{$typeadd}page=' + (page+1);
		}
		if(actualCode == 37 && page>1){
			window.location = 'thread.php?fid=$fid&search={$search}&{$w_add}{$typeadd}page=' + (page-1);
		}
	}
}

function shortCut() {
	ajax.send('pw_ajax.php?action=shortcut&fid='+fid,'',function(){
		ajax.guide();
		var rText = ajax.request.responseText.split('\t');
		if (typeof(rText[1]) != 'undefined' && rText[1] == 'successok') {
			getObj('shortcut').innerHTML = "<a style=\"cursor:pointer;\" onclick=\"javascript:shortCut();\" title=\"将本版块移除出我的书签\"><img src=\"$imgpath/$stylepath/thread/"+imgok+"\" align=\"absbottom\" style=\"margin-bottom:2px;\" /></a>";
			var shortcutforum = getObj('shortcutforum');
			if (myshortcut == false) {
				var shortcutname = getObj('shortcutname');
				shortcutname.innerHTML = "收藏的版块:&nbsp;";
				shortcutforum.innerHTML = "<li id=\"scf_"+fid+"\"><a href=\"thread.php?fid="+fid+"\">"+forumtitle+"</a>&nbsp;</li>";
			} else {
				if (IsElement('shortcutforum')) {
					var li = document.createElement('li');
					li.id = 'scf_'+fid;
					li.innerHTML = "<a href=\"thread.php?fid='+fid+'\">"+forumtitle+"</a>&nbsp;";
					shortcutforum.appendChild(li);
				}
			}

		} else if (typeof(rText[1]) != 'undefined' && rText[1] == 'successno') {
			getObj('shortcut').innerHTML = "<a style=\"cursor:pointer;\" onclick=\"javascript:shortCut();\" title=\"将本版块添加到我的书签\"><img src=\"$imgpath/$stylepath/thread/"+imgno+"\" align=\"absbottom\" style=\"margin-bottom:2px;\" /></a>";
			if (IsElement('scf_'+fid)) {
				var thisnode = getObj('scf_'+fid);
				var shortcutforum = thisnode.parentNode;
				shortcutforum.removeChild(thisnode);
				var li = shortcutforum.childNodes;
				for (var i=0; i<li.length; i++) {
					if (li[i].nodeType == 1) {
						return false;
					}
				}
				myshortcut = false;
				var shortcutname = getObj('shortcutname');
				shortcutname.innerHTML = "热门版块:&nbsp;";
				shortcutforum.innerHTML = getObj('db_shortcutforum').innerHTML;
			}
		}

	});
}
</script>
<!--
EOT;
if($ajaxcheck){print <<<EOT
-->
<script type="text/javascript" language="JavaScript" src="js/ajax_subject.js"></script>
<!--
EOT;
}if($foruminfo[aid] || is_array($foruminfo['commend']) || $thread_children){print <<<EOT
-->
<script language="JavaScript" src="js/Deploy.js"></script>
<!--
EOT;
}?>-->
